/*
 * types.h
 *
 *  Created on: 2011/04/23
 *      Author: AKS
 */

#ifndef TYPES_H_
#define TYPES_H_

// binary macro
#define B8(y)  ( ((0x##y##L & 0x00000001L) >>  0) \
               | ((0x##y##L & 0x00000010L) >>  3) \
               | ((0x##y##L & 0x00000100L) >>  6) \
               | ((0x##y##L & 0x00001000L) >>  9) \
               | ((0x##y##L & 0x00010000L) >> 12) \
               | ((0x##y##L & 0x00100000L) >> 15) \
               | ((0x##y##L & 0x01000000L) >> 18) \
               | ((0x##y##L & 0x10000000L) >> 21) )


// typical embedded system unit
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef unsigned long int   DWORD;

typedef   signed char       SBYTE;
typedef   signed short      SWORD;
typedef   signed long int   SDWORD;

typedef enum _BOOL
{
	FALSE = 0,
	TRUE  = 1
} BOOL;

// NULL define
#ifndef NULL
#define NULL 0
#endif

#endif /* TYPES_H_ */
